package com.ruoyi.web.controller.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author chenjian
 * @create 2023/9/19 15:57
 * @desc
 **/
@AllArgsConstructor
public enum NoticeTypeEnum {
    ONE("1", "头条新闻"),
    TWO("2", "行业动态"),
    THREE("3", "质控中心动态"),
    FOUR("4", "质控中心培训"),
    FIVE("5", "委员风采"),
    SIX("6", "医院介绍"),
    SEVEN("7", "质控中心介绍"),
    EIGHT("8", "首页轮播图"),
    NINE("9", "监测报告"),
    TEN("10", "年度报告"),
    ;

    @Getter
    private final String code;
    @Getter
    private final String desc;

    public static String getDescByCode(String code) {
        for (NoticeTypeEnum typeEnum : NoticeTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum.getDesc();
            }
        }
        return "";
    }
}